#!/usr/bin env python3

import random
import string


def gen_random_code(x=1):
    # also : random.choice(string.ascii_letters)
    strs = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    return ''.join(random.choice(strs) for i in range(x))